package com.example.demo.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * @description:
 * @author: cj
 * @create: 14-08-01 14:42:22
 */
public class PrintWordsJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        String printTime = new SimpleDateFormat ("yy-MM-dd HH-mm-ss").format(new Date ());
        System.out.println("PrintWordsJob 开始时间:" + printTime + ", prints: Hello Job-" + new Random ().nextInt(100));

    }
}
